package com.wisdomparking.tools;

import com.wisdomparking.tools.gaode.AMapUtils;
import com.wisdomparking.tools.gaode.LngLat;

public class GaodeDistance {
	
	public static double getDistance(double mLon1, double mLat1, double mLon2, double mLat2) {
		LngLat start = new LngLat(mLon1, mLat1);
		LngLat end = new LngLat(mLon2, mLat2);
		
		return AMapUtils.calculateLineDistance(start, end);
	}
	
	public static void main(String[] art) {
		
		double mLat1 = 39.923423; 	// point1纬度
		double mLon1 = 116.368904; 	// point1经度
		double mLat2 = 39.922301;	// point2纬度
		double mLon2 = 116.381271;	// point2经度
		
		
		System.out.println(GaodeDistance.getDistance(mLon1, mLat1, mLon2, mLat2));
		
	}

}
